package com.bluesky.plum.domain.repository;

import java.util.List;

/***
 * It is big so it contains all the Entity types.
 * 
 * @author jack
 * 
 * 
 */
public interface BigRepository {

	/**
	 * if enabled paging, then list current page, else list all
	 * 
	 * @return
	 */
	List list(Class clazz);

	Object getByIndex(Class clazz, int index);

	/*
	 * add a new object to the repository
	 */
	void save(Object entity);

	/***
	 * update a existing object
	 * 
	 * @param entity
	 */
	void update(Object entity);

	/**
	 * copy the entity and create a link for the two entity
	 */
	Object getCopy(Object t);

	/**
	 * if it is a copy, then delete the original object, if not, also delete the
	 * original one.
	 * 
	 * @param entity
	 */
	void delete(Object entity);

}
